package edu.sctu.zhuyingzhi.month201506.day20150628.theSecondTestV2.Util;

import edu.sctu.zhuyingzhi.month201506.day20150628.theSecondTestV2.Data.Goods;
import edu.sctu.zhuyingzhi.month201506.day20150628.theSecondTestV2.Data.MainData;

/**
 * Created by user13 on 2015/6/28.
 */
public class GoodsUtil {

    public static void judgeGoods(MainData mainData) {
        int maxCount = 0;
        int minCount = 0;
        for (Goods good : mainData.list) {
            if (Float.parseFloat(good.goods_price) > 100) {
                maxCount++;
            }
            if (Float.parseFloat(good.goods_price) < 100) {
                minCount++;
            }
        }
        System.out.println("大于100为：" + maxCount);
        System.out.println("小于100为：" + minCount);


    }
}
